/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.personal.mapper;

import com.koron.personal.domain.GroupMember;
import com.koron.personal.domain.CommonGroup;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommonGroupMapper {
    Integer insert(CommonGroup bean);

    Integer batchInsertMember(@Param("groupMemberList") List<GroupMember> groupMemberList);

    Integer check(@Param("id") String id, @Param("name") String name, @Param("userCode") String userCode);

    Integer update(CommonGroup bean);

    Integer deleteMemberByGroupId(@Param("groupId") String groupId);

    CommonGroup queryOne(@Param("id")String id);

    List<GroupMember> getMemberByGroupId(@Param("groupId")String groupId);

    List<CommonGroup> getGroupByUserCode(@Param("userCode")String userCode);

    Integer delete(@Param("id")String id);

    List<CommonGroup> getGroupByConditon(@Param("userCode")String userCode, @Param("name")String name, @Param("start")Integer start, @Param("pageSize")Integer pageSize);

    Integer getGroupCount(@Param("userCode")String userCode, @Param("name")String name);
}
